package com.morgan.recyclerviewdemo.entity

import android.graphics.Color
import android.graphics.drawable.Drawable
import com.morgan.recyclerviewdemo.App
import com.morgan.recyclerviewdemo.itemdecoration.TimeLineItemDecoration
import com.morgan.recyclerviewdemo.utils.DeviceUtil

/**
 *description：
 *<br>author：caowugao
 *<br>time：2020/8/24 0024 10:49
 */
class TimeLineData(val text : String, val time : String, val date : String, val circleDrawable : Drawable) : TimeLineItemDecoration.ITimeText {
    private val timeDesc = object : TimeLineItemDecoration.IText {
        override fun getText(): String = time

        override fun getTextSize(): Float = DeviceUtil.sp2Px(App.app, 20f)


        override fun getTextColor(): Int = Color.GRAY
    }

    private val dateDesc = object : TimeLineItemDecoration.IText {
        override fun getText(): String = date

        override fun getTextSize(): Float = DeviceUtil.sp2Px(App.app, 12f)


        override fun getTextColor(): Int = Color.LTGRAY
    }

    override fun getTimeDesc(): TimeLineItemDecoration.IText = timeDesc


    override fun getDateDesc(): TimeLineItemDecoration.IText = dateDesc

    override fun getCircleDrawble(): Drawable? = circleDrawable

}